<!DOCTYPE HTML>
<html class=" met-web oxh">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,minimal-ui">
    <meta name="format-detection" content="telephone=no">
    <title>城市喜舍墙布</title>
    <meta name="description" content="城市喜舍墙布">
    <meta name="keywords" content="城市喜舍墙布">
    <meta name="generator" content="" data-variable="|cn|cn|m1156ui018|10001|10001|0" data-user_name="">
    <link href="<?php echo $viewmulu; ?>/favicon.ico" rel="shortcut icon" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="<?php echo $viewmulu; ?>/basic.css">
    <link rel="stylesheet" type="text/css" href="<?php echo $viewmulu; ?>/show_cn.css">
    <script src="<?php echo $viewmulu;?>/jquery-1.8.3.min.js"></script>
    <script src="<?php echo $viewmulu;?>/layer.js"></script>
    <script src="<?php echo $viewmulu; ?>/met_temdemo.js"></script>
</head>
<body>
<?php $this->load->view('common/menu'); ?>

<div class="news-box back-img-box">
    <section class="message_met_m1156_9_16 lazy met-show" m-id="16" style="background-image: url(&quot;&quot;);">
        <div class="container-fluid">
            <div class="message-box">
                <div class="met-editor lazyload clearfix">
                    <div>
                        <p style="text-align: left;"><img class="imgloading" src="https://images.mituo.cn/m1156ui018/upload/201703/1490684564360391.png" style="display: inline;"></p>
                    </div>
                    <p><strong style="font-size: 20px;display:block;color:#000;">联系我们</strong></p>
                    <div style="font-size: 14px;color:#333;">
                        <p>
                            <strong style="font-size:15px;">商务合作</strong>
                            <br>
                            电话：<?php echo $this->config->item('telephone'); ?><br>
                            邮箱：<?php echo $this->config->item('mail'); ?><br>
                            地址：<?php echo $this->config->item('address'); ?><br>
                            邮编：<?php echo $this->config->item('contact'); ?>
                    </div>
                </div>
                <div class="message-subpage">
                    <div class="row">
                        <div class="col-xxl-8 col-lg-10">
                            <h4>给我们留言</h4>
                            <div class="met-form met-form-validation fv-form-bootstrap4 fv-form">
                                <div class="form-group ftype_input">
                                    <div>
                                        <input name="para115" class="form-control" type="text" placeholder="姓名 " data-fv-notempty="true" data-fv-message="不能为空" id="sub_name">
                                    </div>
                                </div>
                                <div class="form-group ftype_input">
                                    <div>
                                        <input name="para116" class="form-control" type="number" placeholder="电话 " data-fv-phone="true" data-fv-phone-message="电话格式错误" data-fv-notempty="true"  id="sub_tel">
                                    </div>
                                   </div>
                                <div class="form-group ftype_input">
                                    <div>
                                        <input name="para117" class="form-control" type="email" placeholder="邮箱 " data-fv-emailaddress="true" data-fv-emailaddress-message="邮箱格式错误" id="sub_email">
                                    </div>
                                     </div>
                                <div class="form-group ftype_textarea">
                                    <div>
                                        <textarea name="para119" class="form-control" data-fv-notempty="true" data-fv-message="不能为空" placeholder="留言内容 " rows="5" id="sub_con"></textarea>
                                    </div>
                                    </div>
                                <div class="m-b-0 submint">
                                    <button type="submit" id="submit33" class="btn btn-primary btn-block btn-squared"><span>提交留言</span></button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <script>
        $(document).on("click", "#submit33", function () {
            var name = $("#sub_name").val();
            var email = $("#sub_email").val();
            var tel = $("#sub_tel").val();
            var con = $("#sub_con").val();

            var reg = /\w+[@]{1}\w+[.]\w+/;
            if (email == '' || email == undefined) {
                layer.alert("请输入email地址");
                return false;
            }
            if (!reg.test(email)) {
                layer.alert("请输入正确的email地址");
                return false;
            }
            var url = "/message_add";
            $.ajax({
                url: url,
                type: "post",
                data: {'name': name, 'tel': tel, 'email': email, 'con': con},
                dataType: 'json',
                success: function (data) {
                    console.log(data);
                    if (data.status == 1) {
                        layer.alert("留言成功", {
                            skin: 'layui-layer-lan'
                            , closeBtn: 1
                            , anim: 5 //动画类型
                        }, function (index) {
                            window.location.href = window.location.href;
                        });

                    } else {
                        layer.alert("留言失败");
                    }
                }
            });
        });
    </script>
<?php $this->load->view('common/footer'); ?>